package net.sxnic.jhitem.itemannex.dao;

import java.util.List;

import net.sxnic.jhitem.itemannex.ItemAnnex;
import net.sxnic.jhitem.itemannex.dao.ItemAnnexDao;
import net.sxinfo.core.spring25.HibernateDao;

import org.springframework.stereotype.Repository;

@Repository("itemAnnexDao")
public class HibernateItemAnnexDao extends HibernateDao<ItemAnnex, String> implements
	ItemAnnexDao {

	/**
	 * 根据主表id和附件类别查询附件表
	 * @param fileSort 附件类别 
	 * @param baseinfoId 主表ID
	 * @return 附件List
	 */
	public List<ItemAnnex> findListByFileSort(String fileSort,String baseinfoId)
	{
		   String hql="from ItemAnnex where fileSort=? and baseinfoId= ? order by attachOrder";
			return  find(hql, new Object[]{fileSort,baseinfoId});
	}
}
